package com.service;

import com.pojo.Client;
import com.dao.ClientMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClientServiceImpl implements ClientService{
    @Autowired
    private ClientMapper clientMapper;

    public int add(Client client) {

        clientMapper.insert(client);
        return 0;
    }

    public int update() {

        return 0;
    }

    public Client select(Client client) {

        Client client1 =clientMapper.select(client.getEmail());
        System.out.println(1111);
        System.out.println(client1.getSex());
        return client1;
    }

    public List<Client> query() {

        System.out.println(333);
        return clientMapper.getAllClient();
    }
}
